<?php
    include './init.php';

    $page = $_GET['page'];

    $sql = "SELECT * FROM homeoneimage where page=". $page;

    $result = $msq->query($sql);

    if ($result->num_rows > 0) {
        $data['code'] = 1;
        $data['data'] = [];
        while($row = $result->fetch_assoc()) {
            array_push($data['data'],$row);
        }
    } else {
        $data['code'] = 0;
    }
    
    echo json_encode($data);

?>